package com.hch.netty.nacos.entity;

import io.netty.channel.ChannelHandlerContext;

import java.io.Serializable;

/**
 * @Author: HeCongHui
 * @Time :2021/12/14 9:28
 */
public class AddressEntity implements Serializable {
    private String address;
    /**
     * 生产者链接
     */
    private ChannelHandlerContext ctx;

    public AddressEntity(String address, ChannelHandlerContext ctx) {
        this.address = address;
        this.ctx = ctx;
    }

    public AddressEntity(String address) {
        this.address = address;
    }

    public AddressEntity() {
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public ChannelHandlerContext getCtx() {
        return ctx;
    }

    public void setCtx(ChannelHandlerContext ctx) {
        this.ctx = ctx;
    }

    @Override
    public String toString() {
        return "AddressEntity{" +
                "address='" + address + '\'' +
                ", ctx=" + ctx +
                '}';
    }
}
